import { memo } from "react";
import styles from "./expert.module.scss";
let Expert: React.FC<{ l: Obj; show: boolean }> = ({ l, show }) => {
  return (
    <>
      {show && l.expert_speak_list.length > 0 && (
        <div className={styles.expert}>
          <h3>达人怎么说</h3>
          <ul>
            <li>
              <div className={styles.expertuser}>
                <img src={show ? l.expert_speak_list[0].avatar : undefined} alt="" />
                <div>
                  <p>{show && l.expert_speak_list[0].name}</p>
                  <span>{show && l.expert_speak_list[0].user_title}</span>
                </div>
              </div>
              <div className={styles.comment}>{show && l.expert_speak_list[0].title}</div>
              <div
                className={styles.tex}
                dangerouslySetInnerHTML={{
                  __html: show && l.expert_speak_list[0].description,
                }}></div>
            </li>
          </ul>
        </div>
      )}
    </>
  );
};
export default memo(Expert);
